Installing the p4 System

To build p4, position yourself in the p4 directory and type:
\begin{example}
make all MACHINE=<machine>
\end{example}
where <machine> is one of the machine names listed in p4/util/machines, currently: machines


\begin{ifinfo}
\begin{description}
\item[SUN] Sun-3, Sun386i, Sparc-1, or Sparc-...
...SR-1
\par
\item[CM-5] Thinking Machines' CM-5
\end{description}\par
\end{ifinfo}


\begin{iftex}
\begin{tex}
\begin{tabular}{l l}
{\tt SUN} & Sun-3, Sun386i, Sparc...
...
{\tt CM5} & Thinking Machines' CM-5 \\
\par
\end{tabular}\end{tex}\end{iftex}

For example:
\begin{example}
make all MACHINE=SYMMETRY
\end{example}
The all is optional, for example
\begin{example}
make MACHINE=SEQUENT
\end{example}
This will create a machine-dependent Makefile in each subdirectory, make the p4 library, and compile and link a subset of the examples.

To add a new machine type, or to change the characteristic parameters associated with an existing one, you can edit the file p4/util/defs.all.

To save disk space, various intermediate object files can be removed with
\begin{example}
make clean
\end{example}
The system can be restored to its original, machine-independent state with
\begin{example}
make realclean
\end{example}
Note that this removes the machine-dependent Makefiles in each directory, so the operation is not idempotent.

It is also possible to install (or clean) only some of the directories:
\begin{example}
make all MACHINE=SUN DIRS=messages
make clean DIRS='monitors messages'
\end{example}
To install only the Makefiles in all subdirectories, use:
\begin{example}
make makefiles MACHINE=<machine>
\end{example}
To install the necessary library and include files in a directory everything that is needed to compile and link p4 programs, do:


\begin{example}
make install INSTALLDIR=<dir>
\end{example}
This will create a p4 directory in <dir>, build a minimal set of directories, copy the relevant .a and .h files into it, and test the installation by mking a small set of examples.

testing Getting Started for instructions on how to run some example programs after you have installed p4. Installing the Documentation,Examples included with the Distribution,Installing the p4 System,Installing p4